package com.aggron.flow;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.PlatformTransactionManager;
import com.bstek.uflo.env.EnvironmentProvider;

/**
 * @author liuhuan
 * @date 2018年6月17日 14:32:00
 */
public class TestEnvironmentProvider implements EnvironmentProvider {

    @Autowired
    private SessionFactory sessionFactory;

    @Autowired
    private PlatformTransactionManager platformTransactionManager;

    public SessionFactory getSessionFactory() {
        return sessionFactory;
    }

    public void setSessionFactory(SessionFactory sessionFactory) {
        this.sessionFactory = sessionFactory;
    }

    public PlatformTransactionManager getPlatformTransactionManager() {
        return platformTransactionManager;
    }

    public void setPlatformTransactionManager(
            PlatformTransactionManager platformTransactionManager) {
        this.platformTransactionManager = platformTransactionManager;
    }
    @Override
    public String getCategoryId() {
        return null;
    }
    @Override
    public String getLoginUser() {
        //从当前用户里面去取
        return "anonymous";
    }
}
